<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>

<script>

/*
var num = 0;

function fn1(){
	num++;
}
function fn2(){
	num--;
}

fn2();
fn1();
fn2();
alert(num);
*/

// 想要获取函数内的值：

var str = '';
function fn1(){
	var a = '大鸡腿~';
	str = a;
}
fn1();
// alert( str );

function fn2(){
	var a = '9999999克拉钻石23456789';
	fn3(a);
}
fn2();

function fn3(a){
	alert(a);
}

</script>

</head>

<body>
</body>
</html>
